\(\int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [274]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 42 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\arctan (\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \]

[Out]

1/2*arctan(sinh(d*x+c))/a/d+1/2*I/d/(a+I*a*sinh(d*x+c))

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2746, 46, 212} \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\arctan (\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \]

[In]

Int[Sech[c + d*x]/(a + I*a*Sinh[c + d*x]),x]

[Out]

ArcTan[Sinh[c + d*x]]/(2*a*d) + (I/2)/(d*(a + I*a*Sinh[c + d*x]))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps \begin{align*} \text {integral}& = -\frac {(i a) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^2} \, dx,x,i a \sinh (c+d x)\right )}{d} \\ & = -\frac {(i a) \text {Subst}\left (\int \left (\frac {1}{2 a (a+x)^2}+\frac {1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,i a \sinh (c+d x)\right )}{d} \\ & = \frac {i}{2 d (a+i a \sinh (c+d x))}-\frac {i \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \sinh (c+d x)\right )}{2 d} \\ & = \frac {\arctan (\sinh (c+d x))}{2 a d}+\frac {i}{2 d (a+i a \sinh (c+d x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.71 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\arctan (\sinh (c+d x))+\frac {1}{-i+\sinh (c+d x)}}{2 a d} \]

[In]

Integrate[Sech[c + d*x]/(a + I*a*Sinh[c + d*x]),x]

[Out]

(ArcTan[Sinh[c + d*x]] + (-I + Sinh[c + d*x])^(-1))/(2*a*d)

Maple [A] (verified)

Time = 3.74 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.52

method result size
risch \(\frac {{\mathrm e}^{d x +c}}{\left ({\mathrm e}^{d x +c}-i\right )^{2} d a}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 a d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 a d}\) \(64\)
derivativedivides \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) \(75\)
default \(\frac {\frac {i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{2}-\frac {i}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) \(75\)

[In]

int(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

exp(d*x+c)/(exp(d*x+c)-I)^2/d/a-1/2*I/a/d*ln(exp(d*x+c)-I)+1/2*I/a/d*ln(exp(d*x+c)+I)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (34) = 68\).

Time = 0.26 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.43 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (i \, e^{\left (2 \, d x + 2 \, c\right )} + 2 \, e^{\left (d x + c\right )} - i\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + {\left (-i \, e^{\left (2 \, d x + 2 \, c\right )} - 2 \, e^{\left (d x + c\right )} + i\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 2 \, e^{\left (d x + c\right )}}{2 \, {\left (a d e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d e^{\left (d x + c\right )} - a d\right )}} \]

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((I*e^(2*d*x + 2*c) + 2*e^(d*x + c) - I)*log(e^(d*x + c) + I) + (-I*e^(2*d*x + 2*c) - 2*e^(d*x + c) + I)*l
og(e^(d*x + c) - I) + 2*e^(d*x + c))/(a*d*e^(2*d*x + 2*c) - 2*I*a*d*e^(d*x + c) - a*d)

Sympy [F]

\[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=- \frac {i \int \frac {\operatorname {sech}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx}{a} \]

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x)

[Out]

-I*Integral(sech(c + d*x)/(sinh(c + d*x) - I), x)/a

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (34) = 68\).

Time = 0.22 (sec) , antiderivative size = 87, normalized size of antiderivative = 2.07 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {2 \, e^{\left (-d x - c\right )}}{-2 \, {\left (-2 i \, a e^{\left (-d x - c\right )} - a e^{\left (-2 \, d x - 2 \, c\right )} + a\right )} d} - \frac {i \, \log \left (e^{\left (-d x - c\right )} + i\right )}{2 \, a d} + \frac {i \, \log \left (i \, e^{\left (-d x - c\right )} + 1\right )}{2 \, a d} \]

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

-2*e^(-d*x - c)/((4*I*a*e^(-d*x - c) + 2*a*e^(-2*d*x - 2*c) - 2*a)*d) - 1/2*I*log(e^(-d*x - c) + I)/(a*d) + 1/
2*I*log(I*e^(-d*x - c) + 1)/(a*d)

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (34) = 68\).

Time = 0.28 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.43 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {-\frac {i \, \log \left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} + 2 i\right )}{a} + \frac {i \, \log \left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}{a} + \frac {-i \, e^{\left (d x + c\right )} + i \, e^{\left (-d x - c\right )} - 6}{a {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}}}{4 \, d} \]

[In]

integrate(sech(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(-I*log(e^(d*x + c) - e^(-d*x - c) + 2*I)/a + I*log(e^(d*x + c) - e^(-d*x - c) - 2*I)/a + (-I*e^(d*x + c)
 + I*e^(-d*x - c) - 6)/(a*(e^(d*x + c) - e^(-d*x - c) - 2*I)))/d

Mupad [B] (verification not implemented)

Time = 1.91 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.76 \[ \int \frac {\text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {a^2\,d^2}}{a\,d}\right )}{\sqrt {a^2\,d^2}}+\frac {1}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{a\,d\,{\left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}^2} \]

[In]

int(1/(cosh(c + d*x)*(a + a*sinh(c + d*x)*1i)),x)

[Out]

atan((exp(d*x)*exp(c)*(a^2*d^2)^(1/2))/(a*d))/(a^2*d^2)^(1/2) + 1/(a*d*(exp(c + d*x) - 1i)) - 1i/(a*d*(exp(c +
 d*x)*1i + 1)^2)